<template>
    <van-nav-bar title="地址详情" fixed="fixed" left-text="返回" left-arrow placeholder="placeholder" @click="onClickLeft" />
    <van-address-list v-model="chosenAddressId" :list="list" default-tag-text="默认" @add="onAdd" @edit="onEdit" />
    <Tabbar />
</template>

<script setup>
import { ref } from 'vue';
import { showToast } from 'vant';
import Tabbar from '@/components/common/Tabbar.vue';
        const chosenAddressId = ref('1');
        const list = [
            {
                id: '1',
                name: '赛后你先别走',
                tel: '16377863625',
                address: '欧利蒂丝庄园 2 号',
                isDefault: true,
            },
            {
                id: '2',
                name: '奎鹅鹅',
                tel: '19346572845',
                address: '欧利蒂丝庄园 7 号',
            },
        ];
        const onClickLeft = () => history.back();
        const onAdd = () => showToast('新增地址');
        const onEdit = (item, index) =>
         showToast('编辑地址:' + index);
        // router.push({path:''})
</script>

<style scoped>

</style>